<?php

namespace app\api\validate;

use think\Validate;

class Organization extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'org_name|组名称' => 'require|min:2|unique:organization',
    ];

    /**
     * 场景
     */
    protected $scene = [
        'add'   =>  ['org_name'],
        'edit'  =>  ['org_name'=>'require|min:2'],
    ];    
}
